package com.rr.learningdemo.service.impl;

import com.rr.learningdemo.service.DivideService;
import com.rr.learningdemo.service.RetryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;

/**
 * @author zhuangcanrun
 * @Date 2021/05/24/14:47
 * @description
 **/

@Service
public class RetryServiceImpl implements RetryService {

    @Autowired
    private DivideService divideService;

    @Override
    public void method1() {
        int[] a = new int[]{3, 2, 1, 0};
        for (int i : a) {
            divideService.divide(i);
        }
    }

}
